#ifndef COLOR_H
#define COLOR_H

#define RGB16(red,green,blue) ((((red) & 0x1F)<<11) | (((green) & 0x3F)<<5) | (((blue) & 0x1F)<<0))
#define RGB32(red,green,blue) ((((red) & 0xFF)<<16) | (((green) & 0xFF)<<8) | (((blue) & 0xFF)<<0))
#define RGB24TO16(red,green,blue) \
    ((((red>>3)&0x1F)<<11) | (((green>>2)&0x3F)<<5) | ((blue>>3)&0x1F))

#define RED16 RGB16(0x1F,0x0,0x0)
#define GREEN16 RGB16(0x0,0x3F,0x0)
#define BLUE16 RGB16(0x0,0x0,0x1F)
#define WHITE16 RGB16(0x1F,0x3F,0x1F)
#define BLACK16 RGB16(0x0,0x0,0x0)
#define PINK16  RGB24TO16(0xFF,0xC0,0xCB)
#define CRIMSON16 RGB24TO16(0xDC,0x14,0x3C)
#define HOTPINK16 RGB24TO16(0xFF,0x69,0xB4)
#define DEEPPINK16 RGB24TO16(0xFF,0x14,0x93)
#define PURPLE16 RGB24TO16(0x80,0,0x80)
#define DARKRED16 RGB24TO16(0x8B,0x00,0x00)
#define LIGHTGRAY16 RGB24TO16(0xD3,0xD3,0xD3)
#define SILVER16 RGB24TO16(0xC0,0xC0,0xC0)
#define GRAY16 RGB24TO16(0x80,0x80,0x80)
#define SNOW16 RGB24TO16(0xFF,0xFA,0xFA)
#define BROWN16 RGB24TO16(0xA5,0x2A,0x2A)
#define LIME16 RGB24TO16(0x00,0xFF,0x00)
#define YELLOW16 RGB24TO16(0xFF,0xFF,0)
#define GOLD16   RGB24TO16(0xFF,0xD7,0x00)
#define ORANGE16 RGB24TO16(0xFF,0xA5,0)



#endif //COLOR_H
